function SrfBetDAO() {
	this.model = ModelLocator.getInstance();
	var _parser = ParserFactory.getInstance(this.model.config.parser);
	// override abstract functions
	this.getUser = function(command) {
		var user = null;
		var error = false;
		var exception = '';
		try{
			if( localStorage.getItem('srfBetCurrentUser') ){
				user = _parser.decodeUserLocalStorage( localStorage.getItem('srfBetCurrentUser') );
			}
			if( !command ){
				return user;
			}
			command.result( new ResultEvent( ResultEvent.RESULT_SUCCESS, user ) );
		}catch(e){
			error = true;
			exception = e;
		}
		if( error && command ){
			command.fault( new FaultEvent( FaultEvent.FAULT, exception ) );
		}else if( error ){
			return exception;
		}
	}
	this.deleteUser = function(user, command) {
		var error = false;
		var exception = '';
		return;
	}
	this.deleteUserLocalStore = function(user, command) {
		var error = false;
		var exception = '';
		try{
			localStorage.removeItem('srfBetCurrentUser');
			if( !command ){
				return true;
			}
			command.result( new ResultEvent( ResultEvent.RESULT_SUCCESS, user ) );
		}catch(e){
			error = true;
			exception = e;
		}
		if( error && command ){
			command.fault( new FaultEvent( FaultEvent.FAULT, exception ) );
		}else{
			return exception;
		}
	}
	this.localStoreUser = function(user, command) {
		var error = false;
		var exception = '';
		try{
			localStorage.setItem( 'srfBetCurrentUser', _parser.encodeUser( user ) );
			if( !command ){
				return user;
			}
			command.result( new ResultEvent( ResultEvent.RESULT_SUCCESS, user ) )
		}catch(e){
			error = true;
			exception = e;
		}
		if( error && command ){
			command.fault( new FaultEvent( FaultEvent.FAULT, exception ) );
		}else{
			return exception;
		}
	}
}
// implement DAO interface
SrfBetDAO.prototype = new DAO();